﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinDemo
{
    public partial class 键盘鼠标研究 : Form
    {
        public 键盘鼠标研究()
        {
            InitializeComponent();
        }

        private string newLine = "\r\n";

        private void 键盘鼠标研究_KeyUp(object sender, KeyEventArgs e)
        {
            this.label1.Text += string.Format("{0}你现在触动的是KeyUp事件，并且抬起的键为{1},其Value为{2}", newLine, e.KeyCode.ToString(), e.KeyValue);
            //this.label1.Text += e.Control.ToString();
        }

        private void 键盘鼠标研究_MouseClick(object sender, MouseEventArgs e)
        {
            this.label1.Text = string.Format("当前点击的位置 X:{0} - Y:{1}", e.Location.X, e.Y);
        }
    }
}
